package com.example.demo.util;

import java.sql.Connection;
import java.sql.DriverManager;

public class ConnectionUtil {
    public  static Connection  getConnection() throws Exception {
        String url = "jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8";
        String  userName = "root";
        String passWorld = "123456";
        Class.forName("com.mysql.jdbc.Driver");
        return DriverManager.getConnection(url, userName, passWorld);
    }
}
